package cn.tedu.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
//业务异常对象
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ErrorResult {

    private String errCode;
    private String errMessage;

    public static ErrorResult error() {
        return ErrorResult.builder().errCode("666666").errMessage("系统异常稍后再试").build();
    }

    public static ErrorResult faceError() {
        return ErrorResult.builder().errCode("000001").errMessage("图片非人像，请重新上传!").build();
    }
}
